/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.factory;

import ru.jSkyRoom.generator.ItemsGenerator;
import ru.jSkyRoom.generator.adapter.AbstractAutoSelectionItemsGeneratorAdapter;
import ru.jSkyRoom.generator.adapter.AutoSelectionItemsGenerator;
import ru.jSkyRoom.interfaces.major.Armor;
import ru.jSkyRoom.selector.SelectorByEdid;

/**
 *
 * @author Rakev
 */
public class AutoSelectionItemsGeneratorAdapterFactory {

    private static AutoSelectionItemsGeneratorAdapterFactory instance = new AutoSelectionItemsGeneratorAdapterFactory();

    public static AutoSelectionItemsGeneratorAdapterFactory create() {
        return instance;
    }

    protected AutoSelectionItemsGeneratorAdapterFactory() {
    }

    public AutoSelectionItemsGenerator<Armor> adaptionArmorGenerator(ItemsGenerator<Armor> armorGenerator) {
        return new AbstractAutoSelectionItemsGeneratorAdapter<Armor>(armorGenerator) {
            @Override
            protected SelectorByEdid<Armor> createSelector() {
                return SelectorByEdidFactory.create().createArmorSelector();
            }
        };
    }
}
